package com.ruoyi.ftrl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ftrl.mapper.StationEquipmentMapper;
import com.ruoyi.ftrl.domain.StationEquipment;
import com.ruoyi.ftrl.service.IStationEquipmentService;

/**
 * 换热站设备台账信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-24
 */
@Service
public class StationEquipmentServiceImpl implements IStationEquipmentService 
{
    @Autowired
    private StationEquipmentMapper stationEquipmentMapper;

    /**
     * 查询换热站设备台账信息
     * 
     * @param id 换热站设备台账信息主键
     * @return 换热站设备台账信息
     */
    @Override
    public StationEquipment selectStationEquipmentById(Long id)
    {
        return stationEquipmentMapper.selectStationEquipmentById(id);
    }

    /**
     * 查询换热站设备台账信息列表
     * 
     * @param stationEquipment 换热站设备台账信息
     * @return 换热站设备台账信息
     */
    @Override
    public List<StationEquipment> selectStationEquipmentList(StationEquipment stationEquipment)
    {
        return stationEquipmentMapper.selectStationEquipmentList(stationEquipment);
    }

    /**
     * 新增换热站设备台账信息
     * 
     * @param stationEquipment 换热站设备台账信息
     * @return 结果
     */
    @Override
    public int insertStationEquipment(StationEquipment stationEquipment)
    {
        stationEquipment.setCreateTime(DateUtils.getNowDate());
        return stationEquipmentMapper.insertStationEquipment(stationEquipment);
    }

    /**
     * 修改换热站设备台账信息
     * 
     * @param stationEquipment 换热站设备台账信息
     * @return 结果
     */
    @Override
    public int updateStationEquipment(StationEquipment stationEquipment)
    {
        stationEquipment.setUpdateTime(DateUtils.getNowDate());
        return stationEquipmentMapper.updateStationEquipment(stationEquipment);
    }

    /**
     * 批量删除换热站设备台账信息
     * 
     * @param ids 需要删除的换热站设备台账信息主键
     * @return 结果
     */
    @Override
    public int deleteStationEquipmentByIds(Long[] ids)
    {
        return stationEquipmentMapper.deleteStationEquipmentByIds(ids);
    }

    /**
     * 删除换热站设备台账信息信息
     * 
     * @param id 换热站设备台账信息主键
     * @return 结果
     */
    @Override
    public int deleteStationEquipmentById(Long id)
    {
        return stationEquipmentMapper.deleteStationEquipmentById(id);
    }
}
